-- Leviathan (c) v.v.balashoff
local Class = require('leviathan/Class')

local TextShuffleComponent = Class:derive('TextShuffleComponent')

function TextShuffleComponent:new(target, speed, length)
    -- speed in ms, length in sec
    self.id = 'TextShuffleComponent'
    self.typeId = 'TextShuffle'
    self.drawable = false
    self.enabled = true
    self.target = target
    self.org = target.text
    self.speed = speed or 0
    self.length = length or 1
    -- times
    self.born = love.timer.getTime()
    self.time = 0
end

return TextShuffleComponent
